# -*- coding = utf-8 -*-
# @time : 2022/9/12 21:00
# @Authour : dechang
# @File : default.py

# 默认配置

class Config:
    HOSTNAME = '127.0.0.1'
    PORT = '3306'
    DATABASE = 'dbsc'
    USERNAME = 'root'
    PASSWORD = 'root'

    DB_URI = "mysql+pymysql://{username}:{password}@{host}:{port}/{db}?charset=utf8".format(username=USERNAME, password=PASSWORD, host=HOSTNAME, port=PORT, db=DATABASE)
    SQLALCHEMY_DATABASE_URI = DB_URI
    SQLALCHEMY_TRACK_MODIFICATIONS = False  # 不需要跟踪数据的修改


#  开发环境下的配置
class DevlopmentConfig(Config):
    DEBUG = True
    SQLALCHEMY_ECHO = True  # 打印sql


# 生产环境中的配置信息
class ProductConfig(Config):
    pass

